<?php get_header(); 
include (TEMPLATEPATH .'/inc/featured.php');
?>
<?php get_sidebar(); ?>
<div id="main-content">
  				<div class="post">
  					<ul class='links'>
  						<?php 
  							$home_cat = get_option('cfmb-num-cat');
  							$num_cats = explode(',', $home_cats);
  							for ($i = 0; $i < count($num_cats); $i++){
  								$num_cat = trim($num_cats[$i]); 
	  							$phplink = new WP_Query('showposts=3&cat='.$num_cat.'&offset=1');
	  							while ($phplink->have_posts()) {
	  								$phplink->the_post();
  						?>
		  						<li><a href='<?php the_permalink(); ?>'><?php the_title(); ?></a></li>
		  						<?php } 
		  						wp_reset_postdata();
  								?>
  					</ul>
  					
	                <?php 
	        			$php = new WP_Query('showposts=1&cat='.$num_cat);
	        			while ($php->have_posts()): $php->the_post();
	                ?>
	                 <h2><a href="<?php the_permalink(); ?>"><?php the_category(', '); ?></a></h2>
	               
	                    <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>
	                    <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
	                    <p><?php the_excerpt(); ?></p>
	                    <p class="meta-data">By: <?php the_author(); ?> | On: <?php the_time('F j, Y'); ?></p>
	                    <?php comments_popup_link('0','1','%','comment-link'); ?>
	                <?php 
	                	endwhile;wp_reset_postdata();
	                	} 
	                ?>
                </div><!--end post-->
            </div><!--end main-content-->

<?php get_sidebar('second'); ?>
<?php get_footer(); ?>
